﻿@{
    Layout = null;
}
@model ElingOA6_Admin_DSJCJ.Model.IPGroup
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
      @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.ListBox }
    )
    @Html.DevExpress().GetScripts(
         new Script { ExtensionType = ExtensionType.ListBox }
    )
        @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme },
        new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }
)

    <script type="text/javascript">
        $(document).ready(function () {
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert == "OK") {
                alert("操作成功");
                parent.window.location.href = rootPath + "/Admin/IPGroupManager";
            }
            else if (hdjsAlert == "error") {
                alert("操作失败");
            }
        });

        function OK() {
            if (tbFIPgroupName.GetText() == "") {
                alert("IP组名称不可为空");
                return;
            }
            if (tbFStartIP.GetText() == "") {
                alert("开始IP不可为空");
                return;
            }
            if (tbFEndIP.GetText() == "") {
                alert("结束IP不可为空");
                return;
            }
            form1.submit();
        }

    </script>

</head>
<body>
    @using (Html.BeginForm("Save", "IPGroupManager", FormMethod.Post, new { id = "form1" }))
    {
      <table align="center">
        <tr >
            <td width="20%" height="25" align="right" valign="middle">
            IP组名称:
            </td>
            <td width="80%" valign="middle">
              @Html.DevExpress().TextBox(settings =>
         {
             settings.Name = "tbFIPgroupName";
             settings.Width = System.Web.UI.WebControls.Unit.Pixel(255);
             settings.Text = Model.FIPGroupName;
             settings.Enabled = true;
             settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
             settings.Properties.ValidationSettings.EnableCustomValidation = true;
         }).GetHtml()
            </td>           
        </tr>
        <tr>
         <td width="20%" height="25" align="right" valign="middle">
            起始IP:
            </td>
            <td width="80%" valign="middle">
		     @Html.DevExpress().TextBox(settings =>
              {
                  settings.Name = "tbFStartIP";
                  settings.Width = System.Web.UI.WebControls.Unit.Pixel(255);
                  settings.Text = ViewData["startIP"].ToString();
                  settings.Enabled = true;
                  settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                  settings.Properties.ValidationSettings.EnableCustomValidation = true;
              }).GetHtml()
		    </td>
        
        </tr>
        <tr>
         <td width="20%" height="25" align="right" valign="middle">
            结束IP:
            </td>
            <td width="80%" valign="middle">
		     @Html.DevExpress().TextBox(settings =>
              {
                  settings.Name = "tbFEndIP";
                  settings.Width = System.Web.UI.WebControls.Unit.Pixel(255);
                  settings.Text = ViewData["endIP"].ToString();
                  settings.Enabled = true;
                  settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                  settings.Properties.ValidationSettings.EnableCustomValidation = true;
              }).GetHtml()
		    </td>
        
        </tr>          
    </table>
    @Html.Hidden("hdtype", ViewData["type"])
    @Html.Hidden("hdID", ViewData["groupID"])
    @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));  
    
    @Html.Hidden("hdstartIP", ViewData["startIP"])
    @Html.Hidden("hdendIP", ViewData["endIP"])
        
    }
     <script>
         lp.Hide();
    </script>
</body>
</html>
